<!-- apps/frontend/templates/layout.php -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>
      <?php if (!include_slot('title')): ?>
        Simple document management!
      <?php endif; ?>
    </title>
    <link rel="shortcut icon" href="/favicon.ico" />
    <link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen, projection"/>
    <link rel="stylesheet" href="/css/print.css" type="text/css" media="print"/>
    <!--[if IE]><link rel="stylesheet" href="/css/ie.css" type="text/css" media="screen, projection"/><![endif]-->

    <?php use_javascript('jquery-1.4.1.min.js') ?>
    <?php use_javascript('search.js') ?>
    <?php include_javascripts() ?>
    <?php include_stylesheets('main.css') ?>
  </head>
  <body>
 <div id="carrier">
    <div class="container">
	<div class="span-24">
         <div id="header">
           <img src="/images/DocMana3.png" align="left"/>
         </div>
           
         <?php if ($sf_user->isAuthenticated()):?>
            <div id="menu">
                  <a href="<?php echo url_for('@mydocs') ?>">My documents</a>
                  &bull
                  <a href="<?php echo url_for('@document_new') ?>">Create</a>
                  &bull
                  <a href="<?php echo url_for('@search') ?>">Search</a>
                  <?php if ($sf_user->hasCredential('category_access')):?>
                    &bull
                    <a href="<?php echo url_for('@categories') ?>">Categories</a>
                  <?php endif;?>
                  &bull
                  <a href="<?php echo url_for('@sf_guard_signout') ?>">Exit</a>
            </div>
         <?php else:?>
            <h1>Welcome to our system!</h1>
        <?php endif;?>
        
	</div>
	<div class="span-18 last">
            <?php if ($sf_user->hasFlash('notice')): ?>
                <div class="flash_notice"><?php echo $sf_user->getFlash('notice') ?></div>
            <?php endif; ?>
            <?php if ($sf_user->hasFlash('error')): ?>
                <div class="flash_error"><?php echo $sf_user->getFlash('error') ?></div>
            <?php endif; ?>
            <div id="content">
                <?php echo $sf_content ?>
            </div>
	</div>
        
        <div class="span-6">
            <?php if ($sf_user->isAuthenticated()):?>
              <div id="doc_history_header">
                 Recent documents:
              </div>
              <div id="document_history">
                  <ul>
                    <?php foreach ($sf_user->getDocumentHistory() as $document): ?>
                      <li>
                        <?php echo link_to($document->getName(), 'doc_info', $document) ?>
                      </li>
                    <?php endforeach; ?>
                  </ul>
               </div>
            <?php endif;?>
	</div>
        <div class="span-24">
          <div id="books"><img src="/images/5374.jpg" align="right" height="250px"  width="250px"/></div>
        </div>
	<div class="span-24">
            <div id="footer">
            </div>
	</div>
    </div>
  </div>
  </body>
</html>



  